package com.tvserials.notification.utils;

import android.content.Context;
import android.widget.Toast;

public class DisplayToastMessage implements Runnable {

    private String message;
    private int messageId;
    private Context applicationContext;

    public DisplayToastMessage(Context applicationContext, int messageId) {
        this.messageId = messageId;
        this.applicationContext = applicationContext;
    }

    public DisplayToastMessage(Context applicationContext, String message) {
        this.applicationContext = applicationContext;
        this.message = message;
    }

    @Override
    public void run() {
        if (message != null) {
            Toast.makeText(applicationContext, message, Toast.LENGTH_LONG).show();
        }else {
            Toast.makeText(applicationContext, messageId, Toast.LENGTH_LONG).show();
        }
    }

}